<?php
$q = isset($_GET['q'])?htmlspecialchars($_GET['q']):'';
if($q){
    if($q == 'Google'){
        echo "Google 搜索 <br> http://www.google.com";
    }else if ($q == 'Baidu'){
        echo "Baidu 搜索 <br> http://www.baidu.com";
    }else if($q == 'TAOBAO'){
        echo "TAOBAO 搜索 <br> http://www.taobao.com";
    }
}else{
    ?>
<form action="" method="get">
    <select name="q">
        <option value="">选择一个网站</option>
        <option value="Google">Google</option>
        <option value="Baidu">Baidu</option>
        <option value="TAOBAO">TAOBAO</option>
    </select>
    <input type="submit" value="提交">
</form>
<?php
    }
?>